package common;

public class RationalNumber extends Number {
	private final int a;
	private final int b;
	public RationalNumber(String s) {
		s = s.substring(9, s.length() - 1);
		String[] n = s.split(",");
		a = Integer.parseInt(n[0]);
		b = Integer.parseInt(n[1]);
	}
	
	public String toString() {
		return a + "/" + b;
	}
	
}
